package Cloneable;

public class Client7 {
    public static void main(String[] args) {
        //获取原型管理器对象
        PrototypeManager pm = PrototypeManager.getPrototypeManager();

        OfficiaIDocument doc1,doc2,doc3,doc4;

        doc1 = pm.getOfficiaIDocument("far");
        doc1.display();
        doc2 = pm.getOfficiaIDocument("far");
        doc2.display();
        System.out.println(doc1 == doc2);

        doc3 = pm.getOfficiaIDocument("srs");
        doc3.display();
        doc4 = pm.getOfficiaIDocument("srs");
        doc4.display();
        System.out.println(doc3 == doc4);
    }
}

